<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>政务服务-首页</title>
    <link href="client/css/mui.min.css" rel="stylesheet" />
    <link href="client/css/build.css" rel="stylesheet" type="text/css" />
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="./css/font.css">
    <link rel="stylesheet" href="./css/xadmin.css">
    <link rel="stylesheet" type="text/css" href="lib/layui/css/layui.css" />
    <script src="layui/layui.js" type="text/javascript" charset="UTF-8"></script>
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript" src="./lib/layui/layui.js" charset="utf-8"></script>
    <script src="client/js/mui.min.js"></script>
    <script src="client/js/jquery-1.12.4.min.js"></script>
    <script src="client/js/echarts.min.js"></script>

</head>
<body>
<div style="width: 100%;height:30px;">
    <a th:href="@{/selectMuLuByLawId(lid=${law.id})}" style="width: 50%;height: 100%;display: inline-block;text-align: center;line-height: 30px;background-color: #007DDB">法规目录</a>
    <a style="width: 50%;height: 90%;display: inline-block;float: right;text-align: center;line-height: 30px;background-color: #007DDB">版本及下载</a>
</div>
<div style="width: 100%;margin-top: 20px;">
    <label th:text="${law.lawsAlias}" style="margin-right: 5px"></label>
    <label th:text="${law.lawsName}"></label>
    <input type="hidden" th:value="${law.lawsPath}" id="path">
    <a  id="download" style="display: inline-block;width: 40px;height: 20px; background-color: #007DDB ;color: white;border-radius: 4px;float: right;text-align: center;margin-right: 20px" >下载</a>
</div>

<!-- 底部信息-->
<div class="footer_box">
    <div class="footer_txt">
        <p>版权所有：中国民用航空局</p>
        <p>ICP备案编号：京ICP备19046468号</p>
    </div>
</div>
<!-- 底部tabbar    start -->
<nav class="mui-bar mui-bar-tab tabbar-bottom">
    <a class="mui-tab-item mui-active" onclick="window.location.href='/selectAllLaws'">
        <span class="mui-icon"><img src="client/images/nav_home_on.png" /></span>
        <span class="mui-tab-label">首页</span>
    </a>
    <a class="mui-tab-item" onclick="window.location.href='/hudongAdd'">
        <span class="mui-icon"><img src="client/images/nav_hudong.png" /></span>
        <span class="mui-tab-label">咨询</span>
    </a>
    <a class="mui-tab-item" onclick="window.location.href='user.html'">
        <span class="mui-icon"><img src="client/images/nav_user.png" /></span>
        <span class="mui-tab-label">我的</span>
    </a>
</nav>
<!-- 底部tabbar    end -->
<script src="client/js/echart_tab.js"></script>
<script type="text/javascript">
    mui.init();

    // 系统公告滚动
    $(document).ready(function(){
        var timer;
        //滚动文字
        function runtxt(){
            $(".scrollnews ul").animate({marginTop:"-40px"},300,
                function(){
                    $(".scrollnews ul li:last").after($(".scrollnews ul li:first"))
                    $(".scrollnews ul").css("margin-top",0)
                }
            )
        }
        var t=$(".scrollnews ul li").length;
        if(t==1){
            clearInterval(timer)
        }else{
            timer=setInterval(runtxt,5000);
        }
    })

    //统计分析标题tab
    $(document).ready(function(){
        $("#tab_title li").mousedown(function(){
            var t=$(this).index();
            $(this).addClass("cur");
            $(this).siblings().removeClass("cur");
            $("#tab_box .con_box").hide().eq(t).show().css("height","auto");
        })
    })

    //办件统计柱状图
    var dom = document.getElementById("bjtj_c");
    var myChart = echarts.init(dom);
    var app = {};
    option = null;
    option = {
        legend: {
            "textStyle": {
                "fontSize": 10
            },
            "top": "5%",
            "itemHeight": 10,
            "itemWidth": 15
        },
        tooltip: {},
        dataset: {
            dimensions: ['product', '类型1', '类型2', '类型3'],
            source: [
                {product: '2018', '类型1': 43, '类型2': 85, '类型3': 93},
                {product: '2019', '类型1': 83, '类型2': 73, '类型3': 55},
                {product: '2020', '类型1': 86, '类型2': 65, '类型3': 82}
            ]
        },
        xAxis: {type: 'category'},
        yAxis: {},
        // Declare several bar series, each will be mapped
        // to a column of dataset.source by default.
        series: [
            {
                type: 'bar',
                "barWidth":20
            },
            {
                type: 'bar',
                "barWidth":20
            },
            {
                type: 'bar',
                "barWidth":20
            }

        ]
    };
    ;
    if (option && typeof option === "object") {
        myChart.setOption(option, true);
    }

</script>
<script type="text/javascript">
    //注意：折叠面板 依赖 element 模块，否则无法进行功能性操作
    layui.use('element', function(){
        var element = layui.element;

    });
    $("#download").click(function (){
        var path=$("#path").val();
        window.location="downloadLaw?path="+path;
    })
</script>
</div>
</body>

</html>
